class CustomError(Exception):
    def __init__(self, message, code):
        self.message = message
        self.code = code
        super().__init__(self.message)

    @classmethod
    def permission_exception(cls):
        return cls("权限异常", 510)

    @classmethod
    def user_pass_error(cls):
        return cls("密码或者账号错误", 512)
